#include "PageOneDotOne.h"
#include "Router.h"
#include <iostream>

void PageOneDotOne::show()
{
	std::cout << "FirstPage.1" << std::endl;
	std::cout << "1.one..." << std::endl;
	std::cout << "0.back" << std::endl;
}

void PageOneDotOne::choose()
{
	int in{};
	std::cin >> in;
	switch (in)
	{
	case 1:
		Router::push(parent, "First/1/1");
		break;
	case 0:
		Router::back(parent);
		break;
	default:
		break;
	}
}


struct Register {
	Register() {
		Router::Add::addPage("FirstPage/1", [](std::shared_ptr<ChangePage> parent)->std::unique_ptr<Page> {
			return std::make_unique<PageOneDotOne>(parent);
			});
	}
}_{};